#ifndef __MYCAN_H
#define __MYCAN_H

#include "myDriverConfig.h"
#include "sys.h"

typedef struct CAN_SEND_DATA{
	int angle;
	uint8_t flag;
	
}CAN_T_DATA;


#define CAN_LOOPBACK 1
#if (CAN_LOOPBACK == 1)
#include "OLED.h"
#include "delay.h"
#include "key.h"
void myCAN_LoopBockTest(void);
void myCAN_NORMALTest(void);
#endif


void myCAN_Transmit(CAN_HandleTypeDef *hcan, uint32_t StdId, uint8_t *pData, uint8_t Len);
uint8_t myCAN_Receive(CAN_HandleTypeDef *hcan, uint32_t *StdId, uint8_t *pData, uint8_t *Len);

#if (STM32CUBEMX==1)
extern CAN_HandleTypeDef hcan;
void myHAL_CAN_MspInit(CAN_HandleTypeDef* canHandle);
void myHAL_CAN_Init(void);
#endif

#endif

